﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using QLTV_Public;
using QLTV_BLL;

namespace QLTV_GiaoDien
{
    public partial class uc_ThongKe_ViPham : DevExpress.XtraEditors.XtraUserControl
    {
        public uc_ThongKe_ViPham()
        {
            InitializeComponent();
        }
        ThongKe_BLL thongKe_bll = new ThongKe_BLL();
        private void uc_ThongKe_ViPham_Load(object sender, EventArgs e)
        {
            gridControl1.DataSource = thongKe_bll.thongKe_ViPham();
        }

        private void bbi_XemChiTiet_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frm_ThongKeChiTiet_ViPham f = new frm_ThongKeChiTiet_ViPham();
            f.TenLop = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Tên Lớp").ToString();
            f.ShowDialog();
        }

        private void gridControl1_DoubleClick(object sender, EventArgs e)
        {
            frm_ThongKeChiTiet_ViPham f = new frm_ThongKeChiTiet_ViPham();
            f.TenLop = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Tên Lớp").ToString();
            f.ShowDialog();
        }

        private void bbi_Refresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            uc_ThongKe_ViPham_Load(sender,e);
        }
    }
}
